<%@ page contentType="text/html; charset=utf-8" language="java" import="java.sql.*" errorPage="" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<link href="css/sytle.css" rel="stylesheet" type="text/css" />
<script src="js/jquery-1.7.1.min.js" type="text/javascript"></script>
<script language="javascript" type="text/javascript">
	$(document).ready(function() {
		
	});
	function getUserList() {
		var url = "getUserList";
		$.getJSON(url, null, function callback(data) {
			$.each(data, function(i, n) {
				var row = $("#template").clone();
				row.find("#userId").text(n.userid);
				row.find("#userName").text(n.name);
				if(n.sex)
				{
					row.find("#sex").text("男");
				}
				else
				{
					row.find("#sex").text("女");
				}
				row.find("#registerDate").text(n.createDate);
				row.find("#group").text(n.group);
				row.find("#edit").text("<a herf='' id='"+n.userid+“'>编辑</a>");
				$("#datas").append(row);
			});
		});
	}
</script>
</head>

<body>

<div class="container">
  <div class="sidebar1">
    <ul class="nav">
      <li><a href="#" onClick="getUserList()">用户管理</a></li>
      <li><a href="#">任务管理</a></li>
      <li><a href="#">公告管理</a></li>
    </ul>
</div>
  <div class="content">
    <div id="UserList">
    		<table id="datas" border="1" cellspacing="0"
			style="border-collapse: collapse">
			<tr>
				<th>用户ID</th>
				<th>用户名</th>
				<th>性别</th>
				<th>注册时间</th>
				<th>用户组</th>
				<th>功能</th>
			</tr>
			<tr id="template">
				<td id="userId"></td>
				<td id="userName"></td>
				<td id="sex"></td>
				<td id="registerDate"></td>
				<td id="group"></td>
				<td id="edit"></td>
			</tr>
		</table>
    
    </div>
<h3><!-- end .content --></h3>
</div>
  <div class="sidebar2">
    <h4>公告</h4>
    <p><div id="gg"></div></p>
  <!-- end .sidebar2 --></div>
  <!-- end .container --></div>
</body>
</html>